// 移动端去除默认样式
import './common/style/reset_7043.css'
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
// import VueRouter from 'vue-router'
import axios from 'axios'
// import VueAxios from 'vue-axios'
// import VueResource from 'vue-resource'
// import App from './App'
import Download from './module/download/Download.vue'
// import router from './router'
import FastClick from 'fastclick'

if ('addEventListener' in document) {
  document.addEventListener('DOMContentLoaded', function() {
    FastClick.attach(document.body);
  }, false);
}

Vue.config.productionTip = false

// Vue.use(VueResource)
// Vue.use(VueAxios, axios)
Vue.prototype.$http = axios

// // 0. 如果使用模块化机制编程，導入Vue和VueRouter，要调用
// Vue.use(VueRouter);
// // 1. import 出路由组件
// import index from './components/Index.vue'
// import personal from './components/Personal.vue'
// // 2. 定义路由
// const routes = [
//   { path: '/', component: index },
//   { path: '/personal', component: personal }
// ]
// // 3. 创建 router 实例，然后传 `routes` 配置
// const router = new VueRouter({
//   routes
// })

/* eslint-disable no-new */
new Vue({
  el: '#app',
  // router,
  template: '<Download/>',
  components: { Download },
  data: {
    eventHub: new Vue()  // 事件(中心)枢纽
  }
})
